{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 一些样本数据集"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### forge数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "X.shape:(26, 2)\n"
     ]
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEGCAYAAABsLkJ6AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3dfXxU9Zn38c+VEIPyDAaNoAtNXReJNRpQW13KiqjYB29XauVJ7bbSrhYRu+u6dLt1671g7d6iqNtd264NFShWS1t3GyW6WtHaShAoQVprrO6C4UEQIVYjgev+Y04whMxkksyZMzPn+3695pWZc35zzsUhOdf5nfN7MHdHRETipyjqAEREJBpKACIiMaUEICISU0oAIiIxpQQgIhJTfaIOoDuOPfZYHzVqVNRhiIjklbVr177p7mUdl+dVAhg1ahT19fVRhyEiklfM7PXOlusWkIhITCkBiIjElBKAiEhMKQGIiMSUEoCISEwpAYiIxJQSgGRMU1MTF0/6ONu2bYs6FBFJgxKAZMwdC27jheef444Ft0UdioikQQlAMqKpqYmamu/z5Ky+1NQ8oFqASB5QApCMuGPBbVz9kWLOKC/mqtOKVQsQyQNKANJrbVf/N5+d+Hzz2agWIJIHlACk19qu/ssHJH6dygcUqRYgkgeUAKRXOl79t1EtQCT3KQFIr3S8+m+jWoBI7lMCkB5LdvXfRrUAkdymBCA9luzqv41qAVIoCrWTY15NCCO5Zc2vn+e5Nc3c9Vzqcue+/8vsBCQSkvadHO9cfF/U4WSMuXvUMaRt3LhxrhnBRCSbmpqaGHtKBU9OK+KCHx5k0+9e5fj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AEREYkoJQEQkppQARERiSglARCSm/j/oiXIza2ms+gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import mglearn\n",
    "# 生成数据集\n",
    "X,y = mglearn.datasets.make_forge()\n",
    "# 数据集绘图\n",
    "mglearn.discrete_scatter(X[:,0],X[:,1],y)\n",
    "plt.legend(['Class0','Class1'],loc=4)\n",
    "plt.xlabel('First Feature')\n",
    "plt.ylabel('Second Feature')\n",
    "print(f\"X.shape:{X.shape}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### wave数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0, 0.5, 'Target')"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAAEKCAYAAAAb7IIBAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAU/ElEQVR4nO3df5BdZX3H8c+HJTZpoF07poMsScEfE0WwZlhRTKejiCZlLEQqjlStFmtGO1psa0ZobKm/Bhg6TjvqTE0Hqlb8OSTRCk4Igz+KTpANCb8MOOhoYWFqlIkEzYwmfvvHPSub5e7eu/eec59zzvN+zexk74+95zmb5HzOeZ7nfB9HhAAA+TkmdQMAAGkQAACQKQIAADJFAABApggAAMgUAQAAmUoWALaX2v6O7Ttt32v7fanaAgA5cqr7AGxb0vKIeNz2Ekm3SrokInYlaRAAZObYVBuOTvI8XjxcUnxxVxoAjEiyAJAk22OSdkt6lqSPRc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bIzGJD1SvHya7Q9KGpd0nKQdA2xvZ0TM1Nh/paTzbL+7eLxU0ip1wgWoHAEAHM2S7o2Is7q89gl1Vo+60/ab1amT081hPXF1vXTOaz+fs60/a8miOGgguoCAo90vaYXts6RO6WDbzyteO17SI0U30etn/czB4rUZP5R0RvH9axbY1g5J7ywqVMr2muGbD/SPAABmKZZ0fI2kq2zfKWmvpJcUL/+jOqtH7dTRpXY/J2lTMZD7TEn/Iunttr+tTiXN+XxAnaX77ioWXv9AqTsD9EA1UADIFFcAAJApAgAAMkUAAECmCAAAyBQBAACZIgAAIFMEAABk6v8BZDgxALP0xUoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "X,y=mglearn.datasets.make_wave(n_samples=40)\n",
    "plt.plot(X,y,'o')\n",
    "plt.ylim(-3,3)\n",
    "plt.xlabel('Feature')\n",
    "plt.ylabel('Target')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "### 威斯康辛州乳腺癌数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "cancer.keys:\n",
      "dict_keys(['data', 'target', 'frame', 'target_names', 'DESCR', 'feature_names', 'filename'])\n"
     ]
    }
   ],
   "source": [
    "from sklearn.datasets import load_breast_cancer\n",
    "cancer = load_breast_cancer()\n",
    "print(f'cancer.keys:\\n{cancer.keys()}')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(569, 30)\n"
     ]
    }
   ],
   "source": [
    "print(f\"{cancer.data.shape}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Sample count per class:\n",
      "{'malignant': 212, 'benign': 357}\n"
     ]
    }
   ],
   "source": [
    "import numpy as np\n",
    "print(\"Sample count per class:\\n{}\".format({n:v for n,v in zip(cancer.target_names,np.bincount(cancer.target))}))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Feature names:\n",
      "['mean radius' 'mean texture' 'mean perimeter' 'mean area'\n",
      " 'mean smoothness' 'mean compactness' 'mean concavity'\n",
      " 'mean concave points' 'mean symmetry' 'mean fractal dimension'\n",
      " 'radius error' 'texture error' 'perimeter error' 'area error'\n",
      " 'smoothness error' 'compactness error' 'concavity error'\n",
      " 'concave points error' 'symmetry error' 'fractal dimension error'\n",
      " 'worst radius' 'worst texture' 'worst perimeter' 'worst area'\n",
      " 'worst smoothness' 'worst compactness' 'worst concavity'\n",
      " 'worst concave points' 'worst symmetry' 'worst fractal dimension']\n"
     ]
    }
   ],
   "source": [
    "print(\"Feature names:\\n{}\".format(cancer.feature_names))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 波士顿房价数据集"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Data shape(506, 13)\n"
     ]
    }
   ],
   "source": [
    "from sklearn.datasets import load_boston\n",
    "boston = load_boston()\n",
    "print(f\"Data shape{boston.data.shape}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "X.shape:(506, 104)\n"
     ]
    }
   ],
   "source": [
    "X,y=mglearn.datasets.load_extended_boston()\n",
    "print(f\"X.shape:{X.shape}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
